// const javaScriptFrameworks = ["React", "Vue", "Angular"];

// const longConjunctionFormat = new Intl.ListFormat("en", {
//   style: "long",
//   type: "conjunction",
// });
// console.log(longConjunctionFormat.format(javaScriptFrameworks));

// const narrowUnitFormatter = new Intl.ListFormat("en", {
//   style: "narrow",
//   type: "unit",
// });
// console.log(narrowUnitFormatter.format(javaScriptFrameworks));
// // React Vue Angular

// const longConjunctionFormatter = new Intl.ListFormat("en", {
//   style: "long",
//   type: "conjunction",
// });
// console.log(longConjunctionFormatter.format(javaScriptFrameworks));
// // React, Vue, and Angular

// const longDisjunctionFormatter = new Intl.ListFormat("en", {
//   style: "long",
//   type: "disjunction",
// });
// console.log(longDisjunctionFormatter.format(javaScriptFrameworks));
// // React, Vue, or Angular

// const longConjunctionItalianFormatter = new Intl.ListFormat("it", {
//   style: "long",
//   type: "conjunction",
// });
// console.log(longConjunctionItalianFormatter.format(javaScriptFrameworks));
// // React, Vue e Angular

// const longDisjunctionGermanFormatter = new Intl.ListFormat("de", {
//   style: "long",
//   type: "disjunction",
// });
// console.log(longDisjunctionGermanFormatter.format(javaScriptFrameworks));
// // React, Vue oder Angular

// const date = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));

// const dateTimeFormatter = new Intl.DateTimeFormat("en-US", {
//   weekday: "long",
//   year: "numeric",
//   month: "long",
//   day: "numeric",
// });

// console.log(dateTimeFormatter.format(date));

// const d = new Date();
// const dateTimeFormatter = new Intl.DateTimeFormat("en-US", {
//   dateStyle: "short",
// });
// console.log(dateTimeFormatter.format(d));

// const date = new Date();
// const timeFormatterFull = new Intl.DateTimeFormat("en-US", {
//   timeStyle: "full",
// });
// console.log(timeFormatterFull.format(date)); // 输出: "12:03:55 PM China Standard Time"

// const timeFormatterLong = new Intl.DateTimeFormat("en-US", {
//   timeStyle: "long",
// });
// console.log(timeFormatterLong.format(date)); // 输出: "12:03:55 PM GMT+8"

// const timeFormatterMedium = new Intl.DateTimeFormat("en-US", {
//   timeStyle: "medium",
// });
// console.log(timeFormatterMedium.format(date)); // 输出: "12:03:55 PM"

// const timeFormatterShort = new Intl.DateTimeFormat("en-US", {
//   timeStyle: "short",
// });
// console.log(timeFormatterShort.format(date)); // 输出: "12:03 PM"

const date = new Date();

const formatterEn = new Intl.DateTimeFormat("en-US", {
  dateStyle: "full",
  timeStyle: "long",
});
console.log(formatterEn.format(date)); // Thursday, July 31, 2025 at 4:52:48 PM GMT+8

const formatterFr = new Intl.DateTimeFormat("fr-FR", {
  dateStyle: "full",
  timeStyle: "long",
});
console.log(formatterFr.format(date)); // jeudi 31 juillet 2025 à 16:52:48 UTC+8
